package com.zhz.common.tool.sms.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 短信配置
 *
 * @author zhouhengzhe
 * @version 1.0
 * @date 2023/4/24 11:01
 */
@Data
@ConfigurationProperties(prefix = "ihrm.sms")
public class SmsProperties {
    /**
     * 默认：aliyun
     * aliyun，boshitong
     */
    private String type = "aliyun";

    private AliyunSmsProperties aliyun;

    @Data
    public static class AliyunSmsProperties {
        private String accessKeyId;

        private String accessKeySecret;

        private String endpoint;
    }

    private Boshitong boshitong;

    @Data
    public static class Boshitong {
        /**
         * 必传，不传走默认
         */
        private String uid;

        /**
         * 必传，不传走默认
         */
        private String pwd;

        /**
         * 必传，不传走默认
         */
        private String srcPhone;

        /**
         * 选择性，默认都是这个，最好不传
         */
        private String smsPkgUrl;
        /**
         * 选择性，默认都是这个，最好不传
         */
        private String smsUrl;
    }
}
